<?php
defined('_JEXEC') or die;
$categories=$this->categories;
?>
<div class="categories-exercises-list">
    <ul class="categories-list">
        <?php foreach ($categories as $category) {
            $params = json_decode($category->params);
            
            ?>
        <li><a href="<?php echo JRoute::_('index.php?option=com_exercises&cate='.$category->id)?>">
            <?php if(is_file(JPATH_ROOT.'/'.$params->image)){ ?>
                <img src="<?php echo JURI::root().$params->image?>"  alt="<?php echo $category->title;?>"><br>
                <?php }?>
                <?php echo $category->title;?>
            </a></li>
        <?php }?>
        
    </ul>
</div>
